import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/icon/iconfont.css';

// import VueI18n from 'vue-i18n'
// console.log(VueI18n);
// import locale from 'element-ui/lib/locale/lang/en'

// Vue.use(vueI18n)

Vue.use(ElementUI)

// 分页组件
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar"
// 富文本组件
// import Editor from "@/components/Editor"
// 文件上传组件
import FileUpload from "@/components/FileUpload"
// 图片上传组件
import ImageUpload from "@/components/ImageUpload"
// 图片预览组件
import ImagePreview from "@/components/ImagePreview"
// 格式化时间
import { ctime } from '@/utils/fun.js';
import { download } from '@/utils/request'
import vueI18n from '../node_modules/vue-i18n/index';
Vue.prototype.$ctime = ctime;
Vue.prototype.$download = download
//封装成功提示和失败提示
Vue.prototype.$success = function (message) {
  this.$message({ type: 'success', message });
};
Vue.prototype.$error = function (message) {
  this.$message({ type: 'error', message });
}
// 全局组件挂载 分页
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
// Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
 


// main.js
// console.log(process.env.NODE_ENV)   //当前环境
// console.log(process.env.VUE_APP_BASE_API)//前缀
// console.log(process.env.VUE_APP_BASE_API_PATH)//地址

 

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus=this //事件总线----
  }
}).$mount('#app')
